TVSER page# 0001 next
2: COMMENT ⊗   VALID 00007 PAGES
3: C REC  PAGE   DESCRIPTION
4: C00001 00001
5: C00002 00002    BEGIN TVSER ↔ SUBTTL    TV CAMERA SERVICE ROUTINE - J.SAUTER, 1/21/67
6: C00003 00003    IFE FTDISK,<
7: C00006 00004    IFN FTDISK,<
8: C00007 00005    TVINP:  XCTR    XR,[HRRZ AC1,(UUO)]     ADDRESS CHECK THE COMMAND BLOCK
9: C00009 00006    ↑TVRED: MOVEI   DDB,TVDDB                       HERE FROM FBPACK
10: C00012 00007    
11: C00013 ENDMK
12: C⊗;
    TVSER page# 0002 next  prev
14: BEGIN TVSERSUBTTL    TV CAMERA SERVICE ROUTINE - J.SAUTER, 1/21/67
15: 
16: TVINI:  CONO    IOP,0           ;STOP THE 167.
17:         CONO    404,0           ;AND THE CAMERA
18:         POPJ    P,              ;AND RETURN.
19: 
    TVSER page# 0003 next  prev
21: IFE FTDISK,<
22: 
23:         JRST    TVINI           ;INITIALIZE
24:         JRST    HUNG            ;HUNG: PRINT MESSAGE & STOP JOB.
25: TVDSP: JRST    TVINI           ;RELEASE
26:         JRST    TVINI           ;CLOSE
27:         JSP     DAT,UERROR      ;INPUT
28:         JSP     DAT,UERROR      ;OUTPUT
29:         JRST    CPOPJ1          ;ENTER
30:         JRST    CPOPJ1          ;LOOKUP
31:         JSP     DAT,UERROR      ;DUMP OUTPUT
32:         JRST    TVIN            ;DUMP INPUT
33:         POPJ    P,              ;SETO
34:         POPJ    P,              ;SETI
35:         POPJ    P,              ;GETF
36:         JRST    CPOPJ1          ;RENAME
37:         POPJ    P,              ;CLOSE INPUT
38:         POPJ    P,              ;DIRECTORY CLEAR
39:         POPJ    P,              ;MTAPE
40: 
41: TVIN:   HRRZ    TAC,UUO
42:         CAMLE   TAC,USRREL      ;IS ADDRESS LEGAL?
43:         JRST    ADRERR          ;NO.
44:         HRRZ    TAC,@UUO        ;GET FIRST WORD 
45:         HLRO    DAT,@UUO
46:         SUB     TAC,DAT         ;CALC FINAL ADDRESS
47:         CAMLE   TAC,USRREL      ;IN BOUNDS?
48:         JRST    ADRERR          ;NO.
49:         MOVEI   TAC,IOPANY!IOPJDN;YES. DO HIS OP FOR HIM.
50:         HRRM    TAC,TVINT
51:         MOVE    TAC,@UUO
52:         ADDI    TAC,0(PROG)     ;MAKE ABS ADDR.
53:         MOVEM   TAC,TVDAT       ;SAVE FOR LATER
54:         MOVEI   TAC,@UUO        ;GET ABS ADDR OF DATA HEADER.
55:         MOVE    TAC1,1(TAC)     ;CONO TO 404.
56:         HRRM    TAC1,CON404     ;SAVE IT.
57:         MOVEI   TAC1,2(TAC)     ;DATAO TO 404
58:         HRRM    TAC1,DAT404     ;SAVE IT TOO.
59:         ADDI    TAC,3
60:         HRRM    TAC,TVCONI      ;SET UP THE CONI BACK TO USERS CORE
61:         PUSHJ   P,SETACT
62:         MOVE    TAC,[CLKDES,,1]
63:         CONO    PI,PIOFF
64:         IDPB    TAC,CLOCK
65:         CONO    PI,PION
66:         POPJ    P,              ;RETURN TO UUOCON.
67: 
68: CLKDES: CONO    PI,PIOFF        ;TURN OFF PI SYSTEM WHILE WE FIDDLE
69:         CONO    IOP,TVCHN
70:         DATAO   IOP,TVDAT
71: CON404: CONO    404,0           ;FIXED UP.
72: DAT404: DATAO   404,0           ;ALSO FIXED UP.
73:         CONO    PI,PION         ;NOW LET IT FLY!
74:         POPJ    P,              ;RETURN TO CLOCK.
75: 
76: TVINT: JSR     TVSAV           ;SAVE ACS
77: TVCONI: CONI    IOP,.           ;GETS FIXED UP.
78: HUNG:   PUSHJ   P,TVINI         ;SHUT OFF THE 167 AND CAMERA
79:         MOVEI   DDB,TVDDB
80:         MOVE    IOS,DEVIOS(DDB)
81:         TLZE    IOS,IOW
82:         PUSHJ   P,SETIOD        ;SET I/O DONE.
83:         JRST    CLRACT          ;CLEAR I/O ACTIVE BIT, RESTORE AC'S & DISMISS
84: 
85: TVDAT:  0
86: >;END IFE FTDISK
    TVSER page# 0004 next  prev
88: IFN FTDISK,<
89:         JRST    TVINI           ;INITIALIZE
90:         JRST    HUNG            ;HUNG TV CAMERA
91: TVDSP: POPJ    P,              ;RELEASE.
92:         POPJ    P,              ;CLOSE OUTPUT
93:         JSP     DAT,UERROR      ;OUTPUT
94:         JSP     DAT,UERROR      ;INPUT
95:         JRST    CPOPJ1          ;ENTER
96:         JRST    CPOPJ1          ;LOOKUP
97:         JSP     DAT,UERROR      ;DUMP OUTPUT
98:         JRST    TVINP           ;DUMP INPUT
99:         POPJ    P,              ;USETO
100:         POPJ    P,              ;USETI
101:         POPJ    P,              ;UGETF
102:         JRST    CPOPJ1          ;RENAME
103:         POPJ    P,              ;CLOSE INPUT
104:         POPJ    P,              ;UTPCLR
105:         POPJ    P,              ;MTAPE
    TVSER page# 0005 next  prev
107: TVINP:  XCTR    XR,[HRRZ AC1,(UUO)]     ;ADDRESS CHECK THE COMMAND BLOCK
108:         XCTR    XR,[MOVE TAC1,3(UUO)]   ;ADDRESS CHECK THE END.
109:         XCTR    XR,[MOVE TAC1,(AC1)]    ;ADDRESS CHECK FIRST DATA LOCATION.
110:         XCTR    XR,[HLRO TAC1,(UUO)]    ;GET -SIZE OF TRANSFER
111:         CAIG    AC1,JOBPFI              ;ABOVE AREA PROTECTED FROM I/O?
112:         JRST    UADRER                  ;NO. ADDRESS ERROR.
113:         SUB     AC1,TAC1                ;CALCULATE THE END OF THE TRANSFER.+1
114:                                         ;ADDRESS CHECK IS DONE BELOW.
115:         SETOM   DSKCNT(DDB)             ;FLAG WE ARE THE TV CAMERA (SEE DSKSER)
116:         HLRZ    TAC1,PROG               ;GET LOWERS PROTECTION.
117:         CAIL    TAC1,(UUO)              ;MAKE SURE COMMAND BLOCK IS IN LOWER
118:         CAMGE   TAC1,AC1                ;MAKE SURE DATA IS IN THE LOWER TOO.
119:         JRST    UADRER                  ;ADDRESS ERROR.
120:         MOVEI   TAC,@UUO                ;GET ADDRESS OF COMMAND BLOCK
121:         MOVEM   TAC,DSKBUF(DDB)         ;STORE ADDRESS OF COMMANDS. FOR TVRED
122:         HRLZ    TAC1,DDB        ;SET UP FOR MONITOR QUEUE
123:         TLO     TAC1,400000     ;FLAG AS INPUT.
124:         PUSHJ   P,SETACT        ;YES, LOCK INTO CORE FIRST
125:         JRST    FBTVIN          ;THEN GO TO FAST-BAND SERVICE FOR QUEUEING
    TVSER page# 0006 next  prev
127: TVRED: MOVEI   DDB,TVDDB                       ;HERE FROM FBPACK
128:         MOVE    TAC1,DSKBUF(DDB)
129: 
130: ;HERE FROM MONGO WITH IOP OURS AND ADDRESS OF USERS 4
131: ;WORD COMMAND BLOCK IN TAC1.  WE MAY BE AT UUO LEVEL
132: ;IF MONITOR BUFFER WAS EMPTY WHEN WE CALLED TVIN, OR WE
133: ;MAY BE AT INTERRUPT LEVEL, IF WE GOT HERE THROUGH THE
134: ;SUCCESSFUL COMPLETION OF THE PREVIOUS DISK OP.
135: 
136:         LDB     J,PJOBN
137:         HRRZ    J,JBTADR(J)     ;RELOCATION
138:         ADD     J,0(TAC1)       ;RELOCATE CORE ADDRESS
139:         MOVEI   TAC,IOPANY!IOPJDN;CONSO BITS FOR IOP.
140:         CONO    PI,DSKOFF       ;JUST IN CASE.
141:         CONO    IOP,TVCHN       ;GIVE IOP ITS CHANNEL AND
142:                                 ;SET IT UP FOR INPUT.
143:         DATAO   IOP,J           ;FEED IT WC,MA (ABSOLUTE).
144:         CONO    TV,@1(TAC1)     ;SEE TV INTERFACE WRITEUP.
145:         DATAO   TV,2(TAC1)
146:         HRRM    TAC,TVCON
147:         CONO    PI,DSKON
148:         POPJ    P,
149: 
150: HUNG:   AOSA (P)                ;SET SKIP RETURN SO JOB WON'T BE KILLED.
151: TVINT: JSR     TVSAV           ;SAVE ACS, SET UP PDL.
152: TVIN1:  MOVEI   DDB,TVDDB
153:         MOVE    TAC,DSKBUF(DDB)
154:         CONI    IOP,3(TAC)      ;GIVE USER IOP STATUS
155:         MOVE    TAC1,3(TAC)     ;GET STATUS FOR US TOO.
156:         MOVE    IOS,DEVIOS(DDB) ;GET IOS
157:         TRNE    TAC1,IOPANY     ;ANY IOP ERROR BITS?
158:         TRNN    IOS,100         ;ENABLED FOR THIS DATA?
159:         JRST    TVIN2           ;NO ERRORS OR NOT ENABLED FOR ERRORS
160:         LDB     J,PJOBN
161:         DATAI   IOP,IOS         ;GET THE IOP WCMA
162:         HRRZ    IOS,IOS
163:         HRRZ    TAC1,JBTADR(J)  ;GET THE USER'S ADDRESS
164:         SUB     IOS,TAC1        ;USER'S RELATIVE ADDRESS. 
165:         HRLM    IOS,3(TAC)      ;GIVE USER HIS ADDRESS.
166: TVIN2:  CONO    IOP,0
167:         HLLZS   TVCON
168:         MOVEI   IOS,IOACT       ; FIRST, CLEAR THE ACTIVE BIT
169:         ANDCAB  IOS,DEVIOS(DDB)
170:         TLNE    IOS,IOW         ; NOW, BRING HIM OUT OF IO WAIT
171:         PUSHJ   PDP,SETIOD
172:         JRST    FBDFINT         ; NOW TO FAST-BAND SERVICE TO BE DEQUEUED
173: >
174:         BEND TVSER
    TVSER page# 0007 next  prev
 EOF: TVSER end-of-file. cnt=6